<HTML>
<HEAD>
<TITLE>Getting started - Methanol</TITLE>
<LINK rel=stylesheet href="style.css" type="text/css">
<BODY text="#000000" bgcolor="#FFFFFF" link="#0000FF" vlink="#990000" alink="#FF0000">
<TABLE WIDTH="98%" NOBORDER >
<TR><TD WIDTH=400>
<TABLE WIDTH=400 NOBORDER>
<TD WIDTH=116>
<a href="http://www.gromacs.org/"><img SRC="../images/gmxlogo_small.jpg"BORDER=0 height=133 width=116></a></td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=280><br><h2>Getting started - Methanol</h2>
<font size=-1><A HREF="../online.html">Main Table of Contents</A></font><br><br></td>
</TABLE></TD><TD WIDTH="*" ALIGN=RIGHT VALIGN=BOTTOM><p><B>VERSION 4.0<br>
Sun 18 Jan 2009</B></td></tr></TABLE>
<HR>

<P><H2>Methanol</A></H2>
Now you are going to simulate 216 molecules of methanol
in a cubic box. In this example the GROMACS
software team already generated most of the neccesary input
files. The files needed in this example are:
<ul>
<LI> Initial structure of a box of 216 methanol molecules (<TT><a href="gro.html">.gro</a></TT>)</li>

<LI> Topology file of methanol (<tt><a href="top.html">.top</a></tt>)</li>
<LI> Molecular Dynamics parameter file (<TT><a href="mdp_opt.html">.mdp</a></TT>)</li>
</ul>
<P>
Change your directory to <tt>tutor/methanol </tt>:   
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> cd tutor/methanol</tt>
<td></td>
</tr>
</table>
<br>
Let's first have a look at the coordinate file:
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt>  more conf.gro
</tt>
<td></td>
</tr>
</table>
<br>
Or to view the methanol box graphically:
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt>  rasmol methanol.pdb
</tt>
<td></td>
</tr>
</table>
<br>
The Carbon group (CH3) is treated as one particle. In the file it 
is called Me1 (methyl 1) and rasmol does not recognize it as carbon (and hence
colors it purple). 
</p>

<p>
Since all the neccesary files are available, we are going to
preprocess the input files to create a run input 
(<TT><a href="tpr.html">.tpr</a></TT>) file. 
This run input file is the only input file for the
MD-program <TT><a href="mdrun.html">mdrun</a></TT>. 
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt>  grompp -v
</tt>
<td></td>
</tr>
</table>
<br>

Now it's time to start the simulation of 20 picoseconds.
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> mdrun -v
</tt>
<td></td>
</tr>
</table>
<br>

After the MD simulation is finished, it is possible to view the
trajectory with the <a href="ngmx.html">ngmx</a> program:
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> ngmx
</tt>
<td></td>
</tr>
</table>
<br>

<P>
When the program starts, you must select a group of atoms to view. In
our case that will be "MeOH" (for methanol) or "System", which is the
same for a box of methanol as we have. Select one and click OK. Then
select Display->Animate from the menu. Use the buttons to see your
methanol moving (note: "Play" steps one frame forward; "Fast Forward"
plays; "Rewind" skips back to the beginning of the trajectory).
</P>

<hr>
<h2>Analysis of the simulation</h2>
<ol>
<li><p> Calculate a radial distribution function of the oxygen atoms
around oxygen atoms. The index file <TT><a
href="ndx.html">index.ndx</a></TT> now contains two groups, one with
the methyl atoms and one with the oxygen atoms. 
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> g_rdf -n index -o rdf-oo.xvg
</tt>
<td></td>
</tr>
</table>
<br>
The program will ask you for how many groups you want the calculate
the RDF, answer 1 (and select oxygen and oxygen). Now,
view the output graph.
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> xmgrace rdf-oo.xvg 
</tt>
<td></td>
</tr>
</table>
<br>
Which shows you the radial distribution function for oxygen-oxygen in
Methanol. Now do the same thing using the methyl group as reference and
as target (and use e.g. <tt>rdf-mm.xvg</tt> as output file name). View all
the graphs together:
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> xmgrace rdf-oo.xvg rdf-mm.xvg ../water/rdf.xvg -legend load
</tt>
<td></td>
</tr>
</table>
<br>
The <tt>xmgrace</tt> program will display three different graphs.
<font color="red">Compare the resulting graphs. Explain the differences and the
similarities.</font>

</P></li>

<li><p>
We can also do a direct analysis of the number of hydrogen bonds in
methanol, based on O-O distance and O-H ... O angle.
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> g_hbond
</tt>
<td></td>
</tr>
</table>
<br>
Select twice 0, when asked. Check the output with 
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> xmgrace hbnum.xvg 
</tt>
<td></td>
</tr>
</table>
<br>
<font color="red">What is the number of hydrogen bonds per methanol
molecule? What is the maximum possible number? Compare the results to
those from water</font>
</p></li>

<li><p> As a further test of the simulation we will compute the self
diffusion constant of Methanol, again from the <b>Mean
square displacement</b> (MSD) function. 
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> g_msd -n index
</tt>
<td></td>
</tr>
</table>
<br>
(Select Me1, or O2). View the output
<br><br>
<table BORDER=0 CELLSPACING=0 CELLPADDING=8 COLS=3 WIDTH="100%" NOSAVE >
<tr NOSAVE>
<td WIDTH="2%" NOSAVE><font color="#000000"></font></td>
<td WIDTH="80%" BGCOLOR="#000066" NOSAVE><font color="#FFFFFF">

<tt> xmgrace msd.xvg 
</tt>
<td></td>
</tr>
</table>
<br>
Check that the graph is roughly linear. The <tt>g_msd</tt> program also
computes the diffusion constant D for you. 
<font color="red">Compare the result to water. Is it as you would expect?
</font>
</p></li>
</ol>

<hr>
<a href="mixed.html"><h3>Go to the next step</h3></a>
<hr>

</BODY>
</HTML>
